#ifndef __LABEL_BUTTON_H__
#define __LABEL_BUTTON_H__ 

// is a label but behaves as a button

#include <QLabel>
#include <QMouseEvent>

class LabelButton : public QLabel
{
	Q_OBJECT
public:
	LabelButton(const QPixmap& pix, QWidget* parent)
		: QLabel( parent )
	{
		this->setPixmap( pix );
	}

	void mouseReleaseEvent ( QMouseEvent* event )
	{	
		if (event->button() == Qt::LeftButton) 
        	emit clicked(); 
	}

signals:
	void clicked();
};

#endif
